package com.sdy.dcsb.biz.service.impl;

import com.sdy.dcsb.biz.mapper.EsbAtomServiceMapper;
import com.sdy.dcsb.biz.model.EsbAtomservice;
import com.sdy.dcsb.biz.model.EsbAtomserviceVo;
import com.sdy.dcsb.biz.service.EsbAtomServiceService;
import com.sdy.mvc.service.impl.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Slf4j
@Service
public class EsbAtomServiceServiceImpl extends BaseServiceImpl<EsbAtomservice> implements EsbAtomServiceService {
    @Autowired
    private EsbAtomServiceMapper esbAtomServiceDetailedMapper;


    @Override
    public EsbAtomservice selectById(Integer id) {

        return esbAtomServiceDetailedMapper.selectDetailById(id);
    }


    @Override
    public List<EsbAtomserviceVo> selectAllMess(Integer id) {
        return esbAtomServiceDetailedMapper.selectAllMess(id);
    }



    // 原子服务

    @Override
    public List<EsbAtomserviceVo> findCountAtomServiceById(Integer id) {
        return esbAtomServiceDetailedMapper.findCountAtomServiceById(id);
    }

    @Override
    public List<EsbAtomserviceVo> findAllAtomServiceById(Integer id, Integer current, Integer size) {
        return esbAtomServiceDetailedMapper.findAllAtomServiceById(id,current,size);
    }

    @Override
    public List<EsbAtomservice> findAllAtomServiceByIdType(Integer id, Integer current, Integer size, String type, String message) {
        return esbAtomServiceDetailedMapper.findAllAtomServiceByIdType(id,current,size,type,message);
    }

    @Override
    public List<EsbAtomservice> findCountAtomServiceByIdType(Integer id, String type, String message) {
        return esbAtomServiceDetailedMapper.findCountAtomServiceByIdType(id,type,message);
    }

    @Override
    public List<EsbAtomserviceVo> findAtomServiceList(String type, String message, String status, Integer current, Integer size) {
        return esbAtomServiceDetailedMapper.findAtomServiceList(type,message,status,current,size);
    }

    @Override
    public List<EsbAtomserviceVo> findAtomServiceListCount(String type, String message, String status) {
        return esbAtomServiceDetailedMapper.findAtomServiceListCount(type,message,status);
    }

    /**
     * 通过原子服务编码查询原子服务fb
     * @param atomServiceCode
     * @return
     */
    @Override
    public List<EsbAtomservice> selectAtomServiceByCode(String atomServiceCode) {
        return esbAtomServiceDetailedMapper.selectAtomServiceByCode(atomServiceCode);
    }

    /**
     * 通过原子服务编码(右模糊，like 'xxx%')查询原子服务fb
     * @param atomServiceCode
     * @return
     */
    @Override
    public List<EsbAtomservice> selectAtomServiceByCodeLikeRight(String atomServiceCode) {
        return esbAtomServiceDetailedMapper.selectAtomServiceByCodeLikeRight(atomServiceCode);
    }

}
